package top.atluofu.luofuecommerce.product.config;

import com.baomidou.mybatisplus.extension.plugins.PaginationInterceptor;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.transaction.annotation.EnableTransactionManagement;

/**
 * @ClassName: MybatisConfig
 * @description: TODO
 * @author: 有罗敷的马同学
 * @datetime: 2022Year-10Month-31Day-16:44
 * @Version: 1.0
 */
@Configuration
@EnableTransactionManagement
@MapperScan("top.atluofu.luofuecommerce.product.dao")
public class MybatisConfig {
    @Bean
    public PaginationInterceptor paginationInterceptor() {
        PaginationInterceptor paginationInterceptor = new PaginationInterceptor();
        paginationInterceptor.setOverflow(true);
        paginationInterceptor.setLimit(1000);
        return paginationInterceptor;
    }
}
